<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			//实例化promise
			const p = new Promise(function(resolve,reject){
			setTimeout(function(){
				let data='数据库中的用户数据';
				resolve(data);
			},1000);
			});
			//调用promise对象then方法
			p.then(function(value){
			alert(value);
			},function(reason){
				  
			})
		</script>
	</body>
</html>
